﻿import mx.events.ModuleEvent;
import mx.modules.ModuleManager;
import mx.modules.IModuleInfo;
public var info:IModuleInfo;

private function initApp():void {

info = ModuleManager.getModule("ColumnChartModule.swf");

info.addEventListener(ModuleEvent.READY, modEventHandler);
// Load the module into memory. Calling load() makes the
// IFlexModuleFactory available. You can then get an
// instance of the class using the factory's create()
// method.
info.load();
}

private function modEventHandler(e:ModuleEvent):void {
// Add an instance of the module's class to the
// display list.
vb1.addChild(info.factory.create() as ColumnChartModule);
}